/*###################################################################*
#
# MPGL Engine - CrossPlatform OpenGL Engine
# Copyright (C) 2013  Mitchell Pell
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
####################################################################*/

#ifndef GL_WINDOW_H
#define GL_WINDOW_H

#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#include <GLFW/glfw3.h>

/*! Include Updateable Template Header */
#include "../../../Base/Updateable.h"

namespace mp_gl
{
	using namespace mp_base;
	/*!----------------------------------------------------------------
	*	@class		GLWindow
	*	@brief		Wrapper class for the GLFW Window included in 
	*				the GLApp class and used for managing the monitor,
	*				window and drawing.
	*
	*	@author		Mitchell Pell
	*	@date		9/27/2013
	*	@version	1.0
	*
	-----------------------------------------------------------------*/
	class GLWindow : public Updateable
	{
	private:
		GLFWwindow* m_glfWindow;
	public:
		GLWindow();
		~GLWindow();
		void Initialize(){}
		void Uninitialize(){}
		void Update(){}
		bool CreateGLWindow(int width, int height, 
			const char *title, GLFWmonitor *monitor, GLFWwindow *share);
		void MakeContextCurrent();
		void SwapBuffers();
		int ShouldClose(){return glfwWindowShouldClose(m_glfWindow);}
		GLFWwindow* GetWindow(){return m_glfWindow;}
	private:
	};
}

#endif